#include <iostream>
#include <string>
#include "FileIO.h"

using namespace std;

int main()
{

	FileIO file;
	file.Open( "sampletext.txt", FileIO::FILEOP_WRITE | FileIO::FILEOP_APPENED);

	int age = 1265;
	char buffer[50];

	strcpy( buffer, "Hello world" );

	file.WriteString( buffer, 50 );
	file.Write( &age );

	file.Close();

	int readAge;

	file.Open( "sampletext.txt", FileIO::FILEOP_READ );

	buffer[0] = NULL;
	file.ReadString( buffer, 50 );
	file.Read( &readAge );


	file.Close();
}